# Arch Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Arch Maintainer: dorphell <dorphell@archlinux.org>
# Hyperbola Maintainer: pekman <pekman@hyperbola.info>

pkgname=dillo
pkgver=3.0.5
pkgrel=5.hyperbola1
pkgdesc="A small, fast graphical web browser built on FLTK"
arch=(i686 x86_64)
url="http://www.dillo.org"
license=('GPL')
install=$pkgname.install
depends=('fltk' 'libjpeg' 'perl' 'openssl' 'libpng' 'gcc-libs' 'libxcursor'
         'libxi' 'libxinerama' 'openssl-1.0')
backup=(etc/dillo/{dillorc,dpidrc})
validpgpkeys=('D91CE08D8679CF2A6F8792E05B1004E936929CEE')
source=(https://www.dillo.org/download/$pkgname-$pkgver.tar.bz2{,.asc}
        dillo.desktop
        dillo.png)
sha256sums=('db1be16c1c5842ebe07b419aa7c6ef11a45603a75df2877f99635f4f8345148b'
            'SKIP'
            '54848080de1911a2af8ff786fbe92bdad8fe8b7b8a0d580c9c79b0a98f9fdcde'
            'de629745e6f3a271475a501e2b94558b3deb7bf9a407bcef16426e600e1731f3')
build() {
  cd "$srcdir/$pkgname-$pkgver"
  CFLAGS="-I/usr/include/openssl-1.0" LDFLAGS="-L/usr/lib/openssl-1.0" \
      ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var --enable-cookies --enable-dlgui --enable-png --enable-gif --enable-jpeg --enable-ssl --enable-ipv6 --enable-threaded-dns
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
        install -m644 AUTHORS ChangeLog README NEWS \
        	"$pkgdir"/usr/share/doc/$pkgname/


	install -Dm644 "$srcdir"/dillo.desktop \
		"$pkgdir"/usr/share/applications/dillo.desktop \


	install -Dm644 "$srcdir"/dillo.png \
		"$pkgdir"/usr/share/pixmaps/dillo.png \

}
